using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Practices.CompositeUI;
using Microsoft.Practices.ObjectBuilder;
using Microsoft.Practices.CompositeUI.SmartParts;
using Microsoft.Practices.CompositeUI.WinForms;

using LibrErian.Common;

namespace LibrErian.Modules.BasicBook
{
	public class BasicBookModuleInit : ModuleInit
	{
		private WorkItem rootWorkItem;

		[InjectionConstructor]
		public BasicBookModuleInit([ServiceDependency] WorkItem workItem)
		{
            rootWorkItem = workItem;
		}

		public override void Load()
		{
            ControlledWorkItem<ModuleController> workItem = rootWorkItem.WorkItems.AddNew<ControlledWorkItem<ModuleController>>();
            workItem.Controller.Run();
		}
	}
}